Carbon


InitContextualMenus

Header: Menus.h Carbon status: Supported

Adds a program to the system registry of contextual menu clients.

OSStatus InitContextualMenus ();
function result

A result code.

DISCUSSION

Your program should call the InitContextualMenus function early in your startup code to register your application as a contextual menu client. If you do not register your program, some system-level functions may respond as though your program does not use contextual menus. Not registering your program may also cause ProcessIsContextualMenuClient to return an incorrect value.

If you have a 68K program, you must pass the selector gestaltContextualMenuAttr to the Gestalt function before calling the InitContextualMenus function. If the Gestalt function returns a bit field with the gestaltContextualTrapAvailable bit set, InitContextualMenus can be called; see “Contextual Menu Gestalt Selector Constants”.

VERSION NOTES

This function is available with Appearance Manager 1.0 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when ContextualMenu 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by ContextualMenu 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)